From c31bcc4cd4aa8586eb79e3b0d61509c72744bb6f Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 27 Mar 2025 15:33:00 +0100 Subject: [PATCH] clean code and logs during bulk upload Signed-off-by: Matthieu Gallien --- src/libsync/bulkpropagatorjob.cpp | 2 +- src/libsync/owncloudpropagator.cpp | 4 +++- src/libsync/putmultifilejob.cpp | 5 ----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/libsync/bulkpropagatorjob.cpp b/src/libsync/bulkpropagatorjob.cpp index c03a82324..80d17d1c9 100644 --- a/src/libsync/bulkpropagatorjob.cpp +++ b/src/libsync/bulkpropagatorjob.cpp @@ -585,7 +585,7 @@ void BulkPropagatorJob::finalizeOneFile(const BulkUploadItem &oneFile) void BulkPropagatorJob::finalize(const QJsonObject &fullReply) { - qCDebug(lcBulkPropagatorJob) << "Received a full reply" << fullReply; + qCDebug(lcBulkPropagatorJob) << "Received a full reply" << QJsonDocument::fromVariant(fullReply).toJson(); for(auto singleFileIt = std::begin(_filesToUpload); singleFileIt != std::end(_filesToUpload); ) { const auto &singleFile = *singleFileIt; diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 8e4e6b0b3..969a8ba03 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -1267,7 +1267,9 @@ bool PropagatorCompositeJob::scheduleSelfOrChild() _tasksToDo.remove(0); PropagatorJob *job = propagator()->createJob(nextTask); if (!job) { - qCWarning(lcDirectory) << "Useless task found for file" << nextTask->destination() << "instruction" << nextTask->_instruction; + if (!propagator()->isDelayedUploadItem(nextTask)) { + qCWarning(lcDirectory) << "Useless task found for file" << nextTask->destination() << "instruction" << nextTask->_instruction; + } continue; } appendJob(job); diff --git a/src/libsync/putmultifilejob.cpp b/src/libsync/putmultifilejob.cpp index 5c132de33..988db43a2 100644 --- a/src/libsync/putmultifilejob.cpp +++ b/src/libsync/putmultifilejob.cpp @@ -100,13 +100,8 @@ bool PutMultiFileJob::finished() if (!oneDevice._device->errorString().isEmpty()) { qCWarning(lcPutMultiFileJob) << "oneDevice has error:" << oneDevice._device->errorString(); } - } - if (oneDevice._device->isOpen()) { oneDevice._device->close(); - } else { - qCWarning(lcPutMultiFileJob) << "Did not close device" << oneDevice._device.get() - << "as it was not open"; } } -- 2.30.2